package com.example.demo.springceliemodel;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName LoginStrategyController
 * @Author lys4134
 * @Date 2022/03/04 10:38:28
 * @Description LoginController
 * @Version 1.0
 **/
@RestController
@RequestMapping("/login/")
@Api(tags = "策略模式")
public class LoginStrategyController {
    @Autowired
    private LoginStrategyServiceImpl loginStrategyService;

    @GetMapping("login")
    @ApiOperation("login")
    public String login(String type) {
        String handleLoginStrategy  = loginStrategyService.login(type);
        System.out.println(handleLoginStrategy);
        return handleLoginStrategy;
    }
}
